home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 422_02 / dosutil / can.doc < prev    next >
Text File  |  1994-03-20  |  1KB  |  40 lines

  1. This utility patches ".COM" programs to give them permanent (CANned)
  2. command line arguments:
  3.  
  4. Use: CAN <oldfile> <newfile> <permanent args>
  5.  
  6. EG:  CAN TEST.COM TEST1.COM /A /B /C
  7.  
  8. The above line will create a TEST1.COM which behaves exactly the same as
  9. TEST.COM, except that it has the /A, /B and /C options permanently enabled.
  10. These options are appended AFTER any arguments which occur on the TEST1
  11. command line.
  12.  
  13. At present, the program only works with ".COM" files < 64K in size.
  14. Source is provided... Feel free to enhance it as you see fit.
  15.  
  16. The program was written in and can be compiled with MICRO-C version
  17. 2.1 (or greater). It should be fairly easy to port to other compilers
  18. or earlier versions of MICRO-C, by modifying the low-level I/O function
  19. calls: "open, close, read, write, lrewind".
  20.  
  21. To compile with MICRO-C, use:
  22.  
  23.             cc can -flop            /* Produce CAN.OBJ */
  24.             masm/ml ecan;           /* Produce ECAN.OBJ */
  25.             lc can ecan             /* Link to produce CAN.COM */
  26.  
  27. This program MUST be compiled in the TINY model (.COM file)... It
  28. references some of its CODE as DATA in order to copy the embedded
  29. function into the patched output file, and therefore must have
  30. overlaid code and data segments.
  31.  
  32. Enjoy,
  33.  
  34. Dave Dunfield
  35.  
  36. Acknowledgments:
  37.  
  38.   Thanks to Roedy Green (of Canadian Mind Products) for suggesting
  39.   the idea in a BIX conference.
  40.